//
//  ServicesManager.h
//  ServiceDebianManager
//
//  Created by Léo Lego on 09/05/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
@class CommandThread;
@class ServerController;
@class ServiceController;
@class DirectCommand;
@interface ServicesManager : NSObject <NSTableViewDataSource> 
{
	IBOutlet  NSTableView *tableview;
	NSMutableArray * array;
	
	NSString * pathPlist;
	
	CommandThread * sshThread;
	
	NSAlert *info;
	ServerController * serverController;
	ServiceController * serviceController;
	DirectCommand * directCommand;
}
/* Main */

-(id) init;
@property (weak) IBOutlet NSProgressIndicator *activityBar;
@property (weak) IBOutlet NSTextField *labelMain;
/* command */
- (IBAction)halt:(id)sender;
- (IBAction)reboot:(id)sender;
- (IBAction)start:(id)sender;
- (IBAction)stop:(id)sender;

/* menu bar show */
- (IBAction)showServerPreferences:(id)sender;

/* services setting */
- (IBAction)addServiceButton:(id)sender;
- (IBAction)removeServiceButton:(id)sender;
- (void)addServiceWithService:(NSString *)nService;

/* Full command */
-(void)fullCommandWithCommand:(NSString*)nCommand;
- (IBAction)fullCommandbutton:(id)sender;

/*  PLSIT FILE */
- (void)savePlist;
- (void)loadPlist;

/* thred*/
- (void) initThread;

/* activity bar */
- (void) activeBar;
- (void) unactiveBar;
- (BOOL) isNotActive;
@end
